<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>OA</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" type="text/css" href="../../css/lib/mui/mui.css">
		<link rel="stylesheet" type="text/css" href="../../css/common/animate.css">
		<link rel="stylesheet" type="text/css" href="../../css/common/common.css"/>
		<style type="text/css">
			.specialList{
				width: 50%; float: left; height: 50px; border: 1px solid rgb(238, 238, 238); padding-top: 10px;
			}
		</style>
	</head>

	<body>
		<header class="header-backcolor mui-bar mui-bar-nav">
			<a id="title_icon" class="mui-action-back  pan_header_a_left">
					<div id="backBtn">
						<img id="back_img" src="../../img/menu/ico_return.png" class="pan_header_left_img_block" >
						<button class="mui-action-back mui-btn mui-btn-blue mui-btn-link mui-btn-nav mui-pull-left">
							<span class="pan_header_left_span_block" id="back">返回</span>
						</button>	
					</div>
			</a>
			<h1 class="mui-title" id="title">专题专栏</h1>
		</header>
		<div id="content"  class="mui-scroll-wrapper mui-content" >
			<div id="slider" class="mui-slider" >
				<div class="mui-slider-group mui-slider-loop" id="banner">
						<div class="mui-slider-item bannerLi" data-id="b73c316cc8f3489f9ea47d36990fb332">
							<a href="javascript:void(0);"><img src="../../img/banner/banner3.jpg" style="width:100%;height:230px;"></a>
						</div>
						<div class="mui-slider-item bannerLi" data-id="28b17dd05f0142c49a59cf10689d880b">
							<a href="javascript:void(0);"><img src="../../img/banner/banner1.jpg" style="width:100%;height:230px;"></a>
						</div>
						<div class="mui-slider-item bannerLi" data-id="3f97421565d5404c92e012ad15e67b24">
							<a href="javascript:void(0);"><img src="../../img/banner/banner2.jpg" style="width:100%;height:230px;"></a>
						</div>
						<div class="mui-slider-item bannerLi" data-id="b73c316cc8f3489f9ea47d36990fb332">
							<a href="javascript:void(0);"><img src="../../img/banner/banner3.jpg" style="width:100%;height:230px;"></a>
						</div>
						<div class="mui-slider-item contentLi" data-id="28b17dd05f0142c49a59cf10689d880b">
							<a href="javascript:void(0);"><img src="../../img/banner/banner1.jpg" style="width:100%;height:230px;"></a>
						</div>
				</div>
				<div class="mui-slider-indicator" id="pointList">
					<div class="mui-indicator mui-active"></div>
					<div class="mui-indicator"></div>
					<div class="mui-indicator"></div>
				</div>
			</div>
			<div style="margin-top: 10px;width: 100%;" id="specialList">
			</div>
		</div>
	</body>
		<script type="text/javascript" src="../../js/common/config.js" ></script>
		<script type="text/javascript" src="../../js/lib/mui/mui.js"></script>
		<script type="text/javascript" src="../../js/lib/jquery/jquery.js"></script>
		<script type="text/javascript" src="../../js/common/common.js" ></script>
		<script type="text/javascript" src="../../js/lib/jquery/jquery.json.js" ></script> 
		<script>
			mui.init({
				swipeBack:false, //启用右滑关闭功能
				keyEventBind: {
					backbutton: false  //关闭back按键监听
				}
			}); 
			mui.plusReady(initSomething);
			
			var userid;
			function initSomething(){
				var self = plus.webview.currentWebview();
				userid = common.utils.getUserId();
				initData();
			}

			//获取数据
			function initData(){
				mui.ajax(ctx+"mobile/common/getSpecial",{
					dataType:'json',//服务器返回json格式数据
					type:'post',//HTTP请求类型
					timeout:10000,//超时时间设置为10秒；	              
					success:function(data){
						var html = '';
				       	if(data&&data.success){
				       		$("#numZS").html(data.data.numZS);
				       		$("#numLD").html(data.data.numLD);
				       		$.each(data.data,function(m,n){
								html = html + '<div class="specialList" data-id="'+n.id+'" data-type="'+n.type+'" data-url="'+n.url+'" data-name="'+n.name+'">';
								html = html + '	<center>'+n.name+'</center>';
								html = html + '</div>';
							});
				      	}else{
				      		alert('服务器异常链接失败!');
				      	}
				      	$("#specialList").html(html);
				      	$(".specialList").on("tap",function(){
							var groupid = $(this).attr("data-id");
							var type = $(this).attr("data-type");
							var url = $(this).attr("data-url");
							var name = $(this).attr("data-name");
							if("special"==type){
								var view = plus.webview.create("specialContentList.html", "specialContentList.html", {scrollIndicator:'none'},{name:name,groupid:groupid});
								plus.webview.show(view, "slide-in-right", "350ms", function() {}, false);	
							}else{
								var view = plus.webview.create("../outWebSite/outWebSite.html", "../outWebSite/outWebSite.html", {scrollIndicator:'none'},{name:name,url:url});
								plus.webview.show(view, "slide-in-right", "350ms", function() {}, false);
							}
							
						});
					},
					error:function(xhr,type,errorThrown){
						alert('服务器异常链接失败!');
					}
				});
			}
		</script>
</html>